<template>
  <view>
    <view class="load" v-if="!load">
      <u-loading-icon
        mode="circle"
        inactive-color="#fff"
        text="正在加载..."
        vertical
      ></u-loading-icon>
    </view>
    <view class="assistant" v-else>
      <view class="fixfix">
        <view class="fix">
          <top-status></top-status>
          <view class="logo">
            <image :src="ossPath + `/upload/1711504330536803.png`"></image>
          </view>
          <view class="navbox">
            <view class="navtext" :class="{'navtext4':index == navindex}" v-for="(item,index) in navList" :key="index" @click="swicthnav(index)">{{item}}
            <view class="downline" v-if="index == navindex"></view>
            </view>
          </view>
          <view class="tabs wap" v-if="navindex == 1">
            <view style="display: flex">
              <!-- <view class="tab5" @click="showSearch = true">
                <uni-icons type="search" size="24" color="#333333"></uni-icons>
              </view> -->
              <view
                class="tab3"
                :class="{ tab4: tabInd == 2 }"
                @click="(tabInd = 2), (exposure_arr = new Set())"
                >综合</view
              >
              <view
                class="tab2"
                :class="{ tab4: tabInd == 1 }"
                @click="(tabInd = 1), (exposure_arr = new Set())"
                >活跃</view
              >
              <view
                class="tab1"
                :class="{ tab4: tabInd == 0 }"
                @click="(tabInd = 0), (exposure_arr = new Set())"
                >新人
                <!-- <view class="user_news" v-if="newUserCount > 0"
                  >{{ newUserCount > 99 ? "+99" : newUserCount }}
                </view> -->
              </view>
            </view>

            <!-- <view class="checkbox" @click="toFiltrate"> 筛选 </view> -->
          </view>
          <view class="tabssearch wap" v-if="showSearch">
            <u-search
              inputAlign="left"
              placeholder="搜索会员昵称"
              @search="search()"
              v-model="Name"
              height="30"
              actionText="取消"
              :actionStyle="{ color: '#333333' }"
              @custom="celSearch"
            ></u-search>
          </view>
          <block v-if="navindex == 0">
          <ppLPopup  @changeoffset='changeoffset'></ppLPopup>
          <view class="skiflex">
            <view v-for="(item,index) in skiList" :key="index" class="skibox" @click="nav_to('/pages/album/ski_details')">
              <image class="skiimg" :src="item.icon"></image>
              <view class="skiname">{{item.name}}</view>
            </view>
            <view class="skibox" @click="nav_to('/pages/album/skiList')">
              <image class="skiimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17302540098401075.png"></image>
              <view class="skiname">{{'更多'}}</view>
            </view>
          </view>
          </block>
        </view>
      </view>
      <x-scroll
        @scroll="scroll"
        :fixed="true"
        :isNav="true"
        @onRefresh="onRefresh"
        @scrolltolower="scrolltolower"
        :refresh="true"
        :offset="topoff"
        extraheight="52"
      >
        <view
          class="message_box"
          v-if="MsgNum > 0"
          @click="tab_to('/pages/tab/msg')"
        >
          <view class="item"> 有{{ MsgNum }}条消息</view>
        </view>
        <!-- <view class="user_status_box" v-if="is_show_app_tips">
          <view class="item">
            <text @click=" gotomember"
              >雪遇会员特权及优惠介绍</text
            >
            <image class="close" @click="close_app_tips()" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17199868005461467.png"></image>
          </view>
        </view> -->
        <block v-if="navindex == 0">
          <view class="eveconbox">
            <view class="content" v-for="(item,index) in eveList" :key="index" @click="nav_to(`/pages/ball/ball_details?id=${item.ID}`)">
              <image class="eventimg" :src="item.Images" mode="aspectFill"></image>
              <view class="eventcon">
                <view class="evetitle">{{item.Title?$util.entitiesToUtf16(item.Title):''}}</view>
                <view class="eveinfo">
                  <image class="infoimg" :src="item.HeadImgUrl" mode="aspectFill"></image>
                  <view class="eveuser">
                    <view class="eveusername">{{item.Name?$util.entitiesToUtf16(item.Name):''}}</view>
                    <view class="evetime">{{getTime2(item.ServerDate)}}</view>
                  </view>
                  <!-- <view class="evelikebox">
                    <image class="likeimg"></image>
                    <view class="likenum">{{'14'}}</view>
                  </view> -->
                </view>
              </view>
              <view class="evetype" :class="{'bg1':item.PlaceType == '约教练','bg2':item.PlaceType == '约拼车','bg3':item.PlaceType == '约陪滑','bg4':item.PlaceType == '约组局',}">{{item.PlaceType}}</view>
              <view class="eveadd">
                <image class="addimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17150538647601021.png"></image>
                <view class="eveaddname">{{item.Place+' | '}}</view>
                <view class="distance">{{item.Distance?item.Distance+'km':''}}</view>
              </view>
            </view>
          </view>
        </block>
        <block v-if="navindex == 1 ">
        <view v-if="list.length > 0" class="list wap">
          <block v-for="item in list" :key="item.ID">
            <view
              class="item"
              @click="nav_to(`/pages/user/user_visitor?id=${item.ID}`)"
            >
              <view class="top">
                <view class="tagbox">
                  <view class="tagcolor" v-if="item.Tag == '教练'">教练</view>
                  <view class="tagcolor2" v-if="item.Tag == '星助教'"
                    >星助教</view
                  >
                </view>
                <view class="imgbox">
                  <image
                    :src="
                      item.UserImgs + '?x-oss-process=image/resize,m_fill,w_700'
                    "
                    mode="aspectFill"
                  />
                </view>
                <view class="online">{{ getTime(item.UpdateTime) }}在线</view>
                <view class="top_bottom">
                  <view class="memberInfo">
                    <view class="name u-line-1">
                      {{ item.Name ? $util.entitiesToUtf16(item.Name) : "" }}
                    </view>
                    <view
                
                      v-if="item.UserType == '黑金年卡会员'"
                      ><image class="vipimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1721006929205711.png" mode="widthFix"></image></view
                    >
                    <view
                     
                      v-if="item.UserType == '年卡会员'"
                      ><image class="vipimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1721006929205711.png" mode="widthFix"></image></view
                    >
                    <view
                      
                      v-if="item.UserType == '金卡会员'"
                      ><image class="vipimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17210069430311410.png" mode="widthFix"></image></view
                    >
                    <view
                     
                      v-if="item.UserType == '体验会员'"
                      ><image class="vipimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1721006953503512.png" mode="widthFix"></image></view
                    >
                  </view>
                  <view class="memberInfo2">
                    <view class="bottom_info">
                    </view>
                    <view class="flx">
                      <view class="distance">
                        <text>{{item.Birthday? getYearStr(item.Birthday)+'后 | ':' 未知 | ' }}</text>
                        <text>{{ item.City ? item.City : "未知" }}</text>
                      </view>
                    </view>
                  </view>
                </view>
              </view>
            </view>
          </block>
          <view style="height: 130rpx; margin-left: 400rpx"></view>
        </view>
        <block v-else>
          <u-empty
            mode="list"
            width="64"
            height="64"
            icon="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17124806786111367.png"
            :show="true"
            iconSize="32"
            text="努力加载会员信息"
          ></u-empty>
        </block>
        </block>
      </x-scroll>

      <!-- 发布 -->
      <view class="eveaddbtn" @click="openre">
          <image class="fabuimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1730255763071946.png"></image>
      </view>
      <!-- 注册提示 -->
      <view class="registerbox" v-if="auth == 0">
        <image
          class="regimg"
          src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1712886837972785.png"
        ></image>
        <view>
          <view class="regtitle_1">欢迎来到雪遇</view>
          <view class="regtitle_2">赶紧注册来认识更多雪搭子吧</view>
        </view>
        <view class="regbtn" @click="gotostart">注册领好礼</view>
      </view>
      <!-- 优惠卷弹窗 -->
      <view v-if="iscoupon || isreceive" class="couponbox">
        <view
          style="
            width: 90%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
          "
        >
          <image
            class="titleh1"
            src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1712889460150219.png"
          ></image>
          <view class="coupon">
            <view class="title1">用户惊喜福利</view>
            <view v-if="couponlist.length > 0">
              <view
                class="conbox"
                v-for="(value, index) in couponlist"
                :key="index"
              >
                <image
                  class="conimg"
                  src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17128895330751157.png"
                ></image>
                <view>
                  <view class="contitle_1">{{ value.Title }}</view>
                  <view class="contitle_2">领取后30天内有效</view>
                </view>
                <view class="numbox">x1</view>
              </view>
            </view>
            <view @click="couponstate" class="nicebtn">开心收下</view>
          </view>
          <image
            @click="closecoupon"
            class="closeimg"
            src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1712889568739446.png"
          ></image>
        </view>
      </view>
    </view>
    <!-- vip续费弹窗 -->
    <VipAlert></VipAlert>
    <!-- 广告弹出层 -->
    <uni-popup ref="banner_ad" type="center">
      <view
        class="ad-popup"
        :style="{
          width: ad_detail.Ad_Width + 'rpx',
          height: ad_detail.Ad_Height + 'rpx',
        }"
      >
        <view class="popup-title">
          <view
            v-if="ad_detail.Close_Location == 'top-right'"
            class="popup-close"
            @click="$refs['banner_ad'].close()"
            >关闭
          </view>
        </view>
        <image
          :src="ad_detail.Banner"
          mode="aspectFill"
          @click="go_ad_url(`${ad_detail.GoUrl}`)"
        ></image>

        <view
          class="down-close"
          v-if="ad_detail.Close_Location == 'down'"
          @click="$refs['banner_ad'].close()"
        >
          <uni-icons type="close" size="36" color="#fff"></uni-icons>
        </view>
      </view>
    </uni-popup>
    <uni-popup ref="wx_popup" type="center">
      <view class="Guidebox">
        <image class="guiimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17231892658671297.png" mode="widthFix"></image>
      <view class="guitext" @click="guibtn">现在完善</view>
      <view class="closebox" @click="forbtn">
        <image v-if="!forever" class="wei" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1724926969656702.png"></image>
        <image v-else class="yi" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1724926984706787.png"></image>
        <view class="closetips">不再提示</view>
      </view>
      <image class="guiclose" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17231893420051324.png" @click="guiclosebtn"></image>
      </view>
    </uni-popup>
    <!-- 发布选择 -->
    <uni-popup ref="release" type="bottom">
        <view class="releasebox">
          <view class="retitlebox">
            <view class="retitle">发布</view>
            <image class="reclose" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1730268317144716.png" @click="closere"></image>
          </view>
          <view class="retext">选择你想要发布的内容</view>
          <view class="reconbox">
            <view class="recon" @click="gotonext(1)">
              <view class="releft">
                <view class="lefttitle">发动态</view>
                <view class="lefttext">记录精彩时刻</view>
              </view>
              <image class="leftimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1730267931278602.png"></image>
            </view>
            <view class="recon" @click="gotonext(2)">
              <view class="releft">
                <view class="lefttitle">找搭子</view>
                <view class="lefttext">寻找滑雪搭子</view>
              </view>
              <image class="leftimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1730267968735976.png"></image>
            </view>
          </view>
        </view>
    </uni-popup>
    <!-- 活动入口 -->
    <image v-if="action_list.length>0" class="Actimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1728436376484714.png" @click.stop="nav_to('/pages/album/activity?id='+action_list[0].ID)"></image>
  </view>
</template>

<script>
import topStatus from "@/components/topStatus/topStatus.vue";
import VipAlert from "@/components/VipAlert/VipAlert.vue";
import ppLPopup from "@/components/ppLPopup/ppLPopup.vue"
export default {
  async created() {
    if (await this.$store.getters.getLoginState) {
    }
  },
  components: {
    topStatus,
    VipAlert,
    ppLPopup
  },
  data() {
    return {
      iseveMore:true,
      eveList:[],
      navList:['找搭子','雪友'],
      navindex:0,
      forever:false,
      isoffset:true,
      action_list:[],
      auth: 1,
      isreceive: false, // 是否领取
      iscoupon: false, // 注册优惠卷弹窗
      couponlist: [],
      tabInd: 1,
      longitude: null,
      latitude: null,

      showSearch: false,
      imgCurr: [],
      load: false,
      user: {},
      _freshing: true,
      list: [],
      PageIndex: 1,
      PageSize: 10,
      Name: "",

      Sex: "",
      UserType: "",
      GolfPoint: "",
      City: "",

      MsgNum: "",
      exposure_arr: new Set(), //曝光集合

      userList: [], //群成员列表
      conversationList: [], //会话列表
      groupList: [], //群聊列表
      sendUser: {},

      lastTime: 0,
      isRotated: false, //头像旋转
      idx: 0,

      ad_detail: {},
      msg_box: [],
      msg_index: 0,
      msg_item: {},

      newUserCount: 0,

      is_show_app_tips: true,

      // IsExpiredUser: {},
      show_close_expired_tips: false,

      //人气榜
      pop_list: [],
      ossPath: "",

      imglist: [
        {
          src: this.$ossPath + "/upload/17110902548021395.png",
          title: "加好友",
        },
        {
          src: this.$ossPath + "/upload/17110903071131233.png",
          title: "加微信",
        },
        {
          src: this.$ossPath + "/upload/171109032005821.png",
          title: "优先推荐",
        },
      ],
      skiList:[
        {
          icon:'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1730252327911290.png',
          name:'广州融创热雪奇迹'
        },
        {
          icon:'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17302523522721192.png',
          name:'延安滑雪场'
        },
        {
          icon:'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17302523669641026.png',
          name:'银峰滑雪场'
        },
        {
          icon:'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17302523669641026.png',
          name:'银峰滑雪场'
        },
      ]
    };
  },
  computed: {
    topoff(){
      if(this.navindex == 0){
        if(this.isoffset){
          return 326
        }else{
          return 262
        }
      }else{
        return 196
      }
    }
  },
  methods: {
    getTime2() {
				return l => {
					let d = new Date(l);
					let timestamp = d.getTime();

					return this.$u.date(timestamp, 'mm-dd');
				}
			},
    gotonext(i){
      if(this.user.IsAuth == 0){
        this.nav_to('/pages/start/start2')
        return
      }
      if(i == 1){
        this.nav_to('/pages/dynamic/dynamic_add')
      }else{
        this.nav_to('/pages/ball/ball_add')
      }
    },
    closere(){
      this.$refs.release.close()
    },
    openre(){
      this.$refs.release.open()
    },
    swicthnav(index){
      console.log(index);
      this.PageIndex = 1
      this.navindex = index
      this.isoffset = true
    },
    forbtn(){
      this.forever = true
      uni.setStorageSync("forever", true);
    },
    changeoffset(data){
      console.log(data,'2222222');
      
      this.isoffset = data
    },
    async getActions() {
				let res = await this.$api.post('Action/Running');
				this.action_list = res.data;
			},
    async OpenAD(){
      if(this.auth == 0){
        return
      }
      if(this.forever){
        return  
      }
      let res = await this.$api.post('Banner/OpenAD',{
        PageKey:'完善资料',
        TaskType:'完善资料'
      })
      if(res.code == 0){
        if(res.data[0]){
            this.$refs.wx_popup.open()
        }
      }
    },
    guibtn(){
      this.nav_to('/pages/user/user_edit')
      setTimeout(()=>{
        this.$refs.wx_popup.close()
      },500)
    },
    guiclosebtn(){
      this.$refs.wx_popup.close()
    },
    gotomember(){
      let IsAuth = uni.getStorageSync('user').IsAuth
      if(IsAuth == 0){
        this.nav_to('/pages/start/start2')
      }else{
        this.nav_to('/pages/user/apply_member')
      }
    },
    //优惠卷弹窗状态
    //领取
    couponstate() {
      // this.iscoupon = false
      this.isreceive = false;
      uni.setStorageSync("iscoupon", false);
      uni.setStorageSync("isreceive", this.isreceive);
      this.nav_to("/pages/court/mycoupon?tabInd=" + 1);
    },
    closecoupon() {
      this.iscoupon = false;
      this.isreceive = false;
      uni.setStorageSync("iscoupon", false);
      uni.setStorageSync("isreceive", true);
    },
    //底部注册
    gotostart() {
      this.nav_to("/pages/start/start2");
    },
    async getIsExpiredUser() {
      if (uni.getStorageSync("user_expired_tips_num") > 5) {
        //当提示弹窗大于9次之后出现 “不再提示”的按钮
        this.show_close_expired_tips = true;
      }

      // if (uni.getStorageSync("user_expired_tips_num") < 9999) {
      //   //判断用户是否到期
      //   let res = await this.$api.post("User/IsExpiredUser");
      //   this.$refs.member_expired_pop.open();
      //   if (res.data) {
      //     this.IsExpiredUser = res.data;
      //     if (this.IsExpiredUser.IsExpired) {
      //       this.$refs.member_expired_pop.open();
      //     }

      //     let n = uni.getStorageSync("user_expired_tips_num");
      //     uni.setStorageSync("user_expired_tips_num", n + 1);
      //   }
      // }
    },
    expired_upgrade() {
      this.nav_to("/pages/user/apply_member");
      this.$refs.member_expired_pop.close();
    },
    close_expired_tips() {
      uni.setStorageSync("user_expired_tips_num", 9999);

      this.$refs.member_expired_pop.close();
    },
    async saveCid() {
      // #ifdef APP
      plus.runtime.setBadgeNumber(0);
      uni.getPushClientId({
        success: (res) => {
          console.log(res);
          this.$api.post("/User/BindCID", {
            CID: res.cid,
          });
        },
        fail(err) {
          console.log(err);
        },
      });
      // #endif
    },
    close_app_tips() {
      uni.setStorageSync("show_member_tips", 1);

      this.is_show_app_tips = false;
    },
    Register() {
      this.nav_to("/pages/start/start2");
    },
    toFiltrate() {
      this.nav_to("/pages/friend/filtrate");
    },
    //去群聊
    toGroupChat() {
      const groupID = "#AW1o76PXU";
      const name = "世界频道";
      this.nav_to(`/pages/chat/group_chat?id=${groupID}&type=2&name=&{name}`);
      this.$im.clearNum(groupID, 2);
    },

    // 获取定位
    getLocationSysc() {
      let _this = this;
      return new Promise((resolve, reject) => {
        uni.getLocation({
          type: "gcj02",
          success: function (res) {
            resolve(res);
          },
          fail: function (err) {
            const defaultLocation = {
              latitude: 0,
              longitude: 0,
            };
            resolve(defaultLocation);
          },
        });
      });
    },

    async getCity() {
      try {
        let loc = await this.getLocationSysc();
        this.longitude = loc.longitude;
        this.latitude = loc.latitude;
      } catch (err) {
        this.longitude = err.longitude;
        this.latitude = err.latitude;
      }
    },
    async getAd() {
      let res = await this.$api.post("/banner/getbanner", {
        PageKey: "测试广告",
      });

      console.log("ad===" + JSON.stringify(res.data));

      if (res.data.length > 0) {
        this.ad_detail = res.data[0];
        this.$refs["banner_ad"].open();
      }
    },

    async getMemberNum() {
      let res = await this.$api.post("/Member/TotalNum");
      const last_count = res.data;

      return last_count;
    },
    go_ad_url(url) {
      this.$refs["banner_ad"].close();

      this.nav_to(url);
    },
    //下拉刷新
    async onRefresh() {
      this.PageIndex = 1;
      if(this.navindex == 0){
          this.geteveList()
      }else{
        if (await this.getList()) {
          uni.$emit("triggered");
        } else {
          setTimeout(() => {
            uni.$emit("triggered");
          }, 2000);
        }
      }
      this.getMsgNum();
    },
    //滚动到底部触发
    async scrolltolower() {
      this.PageIndex++;
      if(this.navindex == 0){
        if(this.iseveMore){
          this.geteveList()
        }
      }else{
        this.getList();
      }
      this.getMsgNum();
    },
    celSearch() {
      this.showSearch = false;
      this.Name = "";
      this.search();
    },

    async getMsgNum() {
      const groupID = "#AW1o76PXU";
      const noID = uni.getStorageSync("user").UserID;
    },
    async save_user_clientdata() {
      let c_model = "";
      let c_system = "";
      uni.getSystemInfo({
        success(res) {
          c_model = res.model;
          c_system = res.system;
        },
      });
      //在线用户
      await this.$api.post("User/UserOnline", {
        ClientModel: c_model,
        ClientOS: c_system,
      });
    },
    async search() {
      //搜索
      this.PageIndex = 1;
      this.list = [];

      this.getList();
    },
    async getList() {
      let url;
      let reqDate;
      let UserActiveStatus = "";
      if (this.tabInd == 1) {
        url = "Member/PageList";
        UserActiveStatus = "活跃";
        reqDate = {
          PageIndex: this.PageIndex,
          PageSize: this.PageSize,
          TrueName: this.Name,
          CompanyID: 6002,
          Sex: this.Sex,
          UserType: this.UserType,
          City: this.City,
          Last_Lat: this.latitude,
          Last_Lng: this.longitude,
          UserActiveStatus: UserActiveStatus,
        };
      } else if (this.tabInd == 2) {
        url = "/Member/Recommend";
        reqDate = {
          PageIndex: this.PageIndex,
          PageSize: this.PageSize,
          TrueName: this.Name,
          CompanyID: 6002,
          Sex: this.Sex,
          UserType: this.UserType,
          City: this.City,
          Last_Lat: this.latitude,
          Last_Lng: this.longitude,
        };
      } else if (this.tabInd == 3) {
        url = "/Member/NearBy";
        UserActiveStatus = "附近";
        reqDate = {
          PageIndex: this.PageIndex,
          PageSize: this.PageSize,
          TrueName: this.Name,
          CompanyID: 6002,
          Sex: this.Sex,
          UserType: this.UserType,
          City: this.City,
          Last_Lat: this.latitude,
          Last_Lng: this.longitude,
        };
      } else {
        url = "Member/PageList";
        UserActiveStatus = "新人";
        reqDate = {
          PageIndex: this.PageIndex,
          PageSize: this.PageSize,
          TrueName: this.Name,
          CompanyID: 6002,
          Sex: this.Sex,
          UserType: this.UserType,
          City: this.City,
          Last_Lat: this.latitude,
          Last_Lng: this.longitude,
          UserActiveStatus: UserActiveStatus,
        };

        // 更新本地存储，将latestCount保存为新的lastCount

        uni.setStorageSync("usersCount", this.toatalUserCount);

        this.newUserCount = 0;
      }

      let res = await this.$api.post(url, reqDate);

      if (res.data) {
        let gift = await this.$api.post("/Member/AcceptGiftReports", {
          PageIndex: 1,
          PageSize: 10000,
          Last_Lat: 0,
          Last_Lng: 0,
        });
        //消费榜
        let com = await this.$api.post("/Member/SendGiftReports", {
          PageIndex: 1,
          PageSize: 10000,
          Last_Lat: 0,
          Last_Lng: 0,
        });

        try {
          //循环查询用户的人气榜，如果该用户同时 人气榜和消费榜都有名，优先显示 人气榜
          res.data.forEach((item, index) => {
            let sq = gift.data.findIndex((s) => s.ID == item.ID);
            if (sq >= 0) {
              item.PopSeq = sq + 1; //索引+1
              item.SeqStr = "人气榜第";
            } else {
              sq = com.data.findIndex((s) => s.ID == item.ID);
              if (sq > 0) {
                item.PopSeq = sq + 1; //索引+1
                item.SeqStr = "月消费第";
              } else {
                item.PopSeq = 0;
              }
            }
          });
        } catch (e) {
          //TODO handle the exception
        }

        if (this.PageIndex == 1) {
          this.list = res.data;
        } else {
          let list = this.list.concat(res.data);
          this.list = this.clearRepetition(list, "ID");
        }
        this.isMore = Array.isArray(res.data) && res.data.length >= this.PageSize;
        this.load = true;
      }
    },
    // 去重
    clearRepetition(arr, key = "id") {
      let newArr = [];
      arr.forEach((item) => {
        let index;
        let check = newArr.every((newItem, i) => {
          if (item[key] !== newItem[key]) {
            index = -1;
            return true;
          } else {
            index = i;

            return false;
          }
        });
        if (check) {
          newArr.push(item);
        } else {
          newArr.splice(index, 1, item);
        }
      });

      return newArr;
    },
    //活动列表
    async geteveList() {
				// 当前tabID为发现请求数据
					const PageKey =  '找雪搭子'
					// 参数对象
					let o = {
						PageIndex: this.PageIndex,
						PageSize: this.PageSize,
						// GolfType: this.navType,
						City: this.city,
						PageKey,
						User_Lng: this.longitude,
						User_Lat: this.latitude,
						ServerDate: this.ServerDate,
						SortField: '',
						SortType:''
					}
					//  当前日期为空清除ServerDate属性
					if (o.ServerDate == null) {
						delete o.ServerDate;
					}
					// 请求接口
					let res = await this.$api.post('Appointment/PageList', o);

					//发现数组赋值
					if (this.PageIndex == 1) {
						this.eveList = res.data
					} else {
						this.eveList = this.eveList.concat(res.data)
					}

					// 添加userIDList
					this.eveList.forEach(i => {
						i.userIDList = i.Item.map(a => a.UserID);
						i.PeopleCount = i.Item.filter(v => v.Status>=1)
					});
					// 是否加载数据
					this.iseveMore = Array.isArray(res.data) && res.data.length >= this.PageSize;
					// 返回true
					this.load = true;
					return true;
			},
    async init() {
      this.user = uni.getStorageSync("user");

      this.PageIndex = 1;

      await this.get_poplist();

      await this.getList();
      await this.geteveList()
      await this.$api.post("/Common/Add_ViewPath", {
        Path: "assistant",
        Platform: uni.getStorageSync("platform"),
      });

      await this.save_user_clientdata();

      this.getIsExpiredUser();
      let res = await this.$api.post("Coupon/List", {
        CompanyID: 6003,
      });
      this.couponlist = res.data;
    },
    scroll(e) {
      const detail = e.detail;
      this.calcExposure(detail.scrollTop);
    },
    calcExposure(scrollTop) {
      const height = uni.upx2px(542); //list高度

      const range = [
        Math.ceil(scrollTop / height),
        Math.floor((this.scroll_height + scrollTop) / height - 1),
      ]; //获取从0排开始曝光序号区间
      if (this._range) {
        for (let i = this._range[0]; i <= this._range[1]; i++) {
          if (i < range[0] || i > range[1]) {
            clearTimeout(this["_st_" + i]);
          }
        }
      }
      for (let i = range[0]; i <= range[1]; i++) {
        if (!this._range || i < this._range[0] || i > this._range[1]) {
          this["_st_" + i] = setTimeout(() => {
            if (!this.exposure_arr.has(i)) {
              this.exposure_arr.add(i);
              if (i * 2 > this.list.length - 1) {
                return;
              }
              const ids = [this.list[i * 2].ID, this.list[i * 2 + 1].ID];
              this.$api.post("/Common/UserExposure", {
                E_UserIDStr: ids.join(","),
              });
            }
          }, 800); //曝光时间设置
        }
      }

      this._range = range;
    },
    async get_poplist() {
      let res = await this.$api.post("/Member/AcceptGiftReports", {
        PageIndex: 1,
        PageSize: 5,
        Last_Lat: 0,
        Last_Lng: 0,
      });
      this.pop_list = res.data;
    },
  },
  watch: {
    Sex(newVal) {
      this.PageIndex = 1;
      this.init();
    },
    City(newVal) {
      this.PageIndex = 1;
      this.init();
    },

    list(newVal) {
      newVal.forEach((item) => {
        this.imgCurr.push(1);
      });
    },
    tabInd(newVal) {
      this.PageIndex = 1;
      this.init();
    },
  },

  async onLoad(e) {
    this.isreceive = uni.getStorageSync("isreceive");
    this.forever = uni.getStorageSync("forever");
    this.ossPath = this.$ossPath;
    this.getActions()
    let that = this;
    uni.$on("getFiltrate", function (data) {
      if (data) {
        that.City = data.city || "";
        that.Sex = data.sex || "";
      }
    });

    if (uni.getStorageSync("show_member_tips")) {
      if (uni.getStorageSync("show_member_tips") == 1)
        this.is_show_app_tips = false;
      else this.is_show_app_tips = true;
    } else {
      this.is_show_app_tips = true;
    }

    // #ifdef MP-WEIXIN
    uni.showShareMenu({
      withShareTicket: false,
      menus: ["shareAppMessage", "shareTimeline"],
    });
    // #endif

    if (await this.$store.getters.getLoginState) {
      await this.getCity();

      if (uni.getStorageSync("Sex")) {
        this.Sex = uni.getStorageSync("Sex");
      }

      await this.init();

      await this.getAd();

      uni.$on("scroll_height", (res) => {
        this.scroll_height = res;
        this.calcExposure(0);
      });

      this.saveCid();
    }
  },
  onShow() {
    this.auth = uni.getStorageSync("user").IsAuth;
    this.iscoupon = uni.getStorageSync("iscoupon") || false;
    // this.isreceive = uni.getStorageSync('isreceive')
    this.OpenAD()
    this.getMsgNum();
    this.getList();
	  // this.IsExpiredUser()
    let that = this;

    this.getMemberNum().then((latestCount) => {
      // 从本地存储中获取上次记录的消息数量
      const localCount = uni.getStorageSync("usersCount") || 0;

      that.toatalUserCount = latestCount;
      // 计算新消息数量
      that.newUserCount = latestCount - localCount;
    });
  },
  onUnload() {
    uni.$off("getFiltrate");
  },
};
</script>

<style lang="scss">
page{
  background-color: #f6f6f6;
}
.eveconbox{
  display: flex;
  flex-wrap: wrap;
  padding: 0 16rpx;
  padding-bottom: 150rpx;
  .content{
    width: 350rpx;
    padding-bottom: 20rpx;
    background-color: #fff;
    border-radius: 16rpx;
    position: relative;
    margin-right: 10rpx;
    margin-bottom: 16rpx;
    .eveadd{
      position: absolute;
      top: 412rpx;
      left: 16rpx;
      // width: fit-content;
      max-width: 318rpx;
      padding: 0 12rpx;
      height: 40rpx;
      background: rgba(0,0,0,0.4);
      border-radius: 20rpx;
      display: flex;
      align-items: center;
      .addimg{
        width: 24rpx;
        height: 24rpx;
        margin-right: 4rpx;
      } 
      .eveaddname{
        max-width: 176rpx;
        font-size: 20rpx;
        font-weight: bold;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .distance{
        font-size: 20rpx;
        font-weight: bold;
        color: #fff;
      }
    }
    .evetype{
      position: absolute;
      top: 0;
      left: 0;
      width: 92rpx;
      height: 44rpx;
      background: #FC6701;
      border-radius: 16rpx 0rpx 16rpx 0rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20rpx;
      font-weight: bold;
      color: #fff;
    }
    .bg1{
      background-color: #0D0D0D;
    }
    .bg2{
      background-color: #01AA20;
    }
    .bg3{
      background-color: #012BAA;
    }
    .bg4{
      background-color: #FC6701;
    }
    .eventimg{
      width: 350rpx;
      height: 468rpx;
      border-radius: 16rpx 16rpx 0rpx 0rpx;
      // background-color: red;
      margin-bottom: 16rpx;
    }
    .eventcon{
      .evetitle{
        font-size: 28rpx;
        color: #333333;
        margin: 0 16rpx;
        margin-bottom: 11rpx;
      }
      .eveinfo{
        display: flex;
        align-items: center;
        margin: 0 16rpx;
        .infoimg{
          width: 48rpx;
          height: 48rpx;
          border-radius: 50%;
          background-color: yellowgreen;
          // margin-left: 12rpx;
          margin-right: 6rpx;
        }
        .eveuser{
          .eveusername{
            font-size: 24rpx;
            color: #666666;
          }
          .evetime{
            font-size: 20rpx;
            color: #999999;
          }
        }
        .evelikebox{
          display: flex;
          align-items: center;
          margin-left: auto;
          .likeimg{
            width: 32rpx;
            height: 32rpx;
            background-color: pink;
          }
          .likenum{
            font-size: 28rpx;
            color: #666666;
          }
        }
      }
    }
  }
}
.releasebox{
  width: 750rpx;
  height: 360rpx;
  background: #FFFFFF;
  border-radius: 48rpx 48rpx 0rpx 0rpx;
  padding: 48rpx 60rpx;
  box-sizing: border-box;
  .retitlebox{
    display: flex;
    align-items: center;
    margin-bottom: 4rpx;
    justify-content: space-between;
    .retitle{
      font-size: 40rpx;
      font-weight: bold;
      color: #141517;
    }
    .reclose{
      width: 32rpx;
      height: 32rpx;
    }
  }
  .retext{
    font-size: 28rpx;
    color: #999999;
    margin-bottom: 40rpx;
  }
  .reconbox{
      display: flex;
      align-items: center;
      .recon{
        width: 306rpx;
        height: 130rpx;
        background: #141517;
        border-radius: 16rpx;
        display: flex;
        align-items: center;
        padding: 24rpx;
        box-sizing: border-box;
        margin-right: 24rpx;
        .releft{
          margin-right: 36rpx;
          .lefttitle{
            font-size: 32rpx;
            font-weight: bold;
            color: #fff;
            margin-bottom: 4rpx;
          }
          .lefttext{
            font-size: 24rpx;
            color: #999999;
          }
        }
        .leftimg{
          width: 64rpx;
          height: 64rpx;
        }
      }
    }
}
.assistant {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.Actimg{
  width: 164rpx;
  height: 164rpx;
  position: fixed;
  right: 22rpx;
  bottom: 408rpx;
}
.Guidebox{
  position: relative;
  .guiimg{
    width: 584rpx;
    height: 762rpx;
    display: block;
  }
  .closebox{
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 80rpx;
    left: 50%;
    transform: translateX(-50%);
    .wei{
      width: 32rpx;
      height: 32rpx;
    }
    .yi{
      width: 32rpx;
      height: 32rpx;
    }
    .closetips{
      color: #999999;
      font-size: 28rpx;
      margin-left: 8rpx;
    }
  }
  .guitext{
    width: 488rpx;
    height: 96rpx;
    background: #0D0D0D;
    border-radius: 48rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32rpx;
    font-weight: bold;
    color: #fff;
    position: absolute;
    bottom: 130rpx;
    left: 50%;
    transform: translateX(-50%);
  }
  .guiclose{
    width: 56rpx;
    height: 56rpx;
    display: block;
    margin: 20rpx auto;
  }
}
.eveaddbtn{
  position: absolute;
  bottom: 112rpx;
  right: 0;
  .fabuimg{
    width: 120rpx;
    height: 120rpx;
  }
}
.registerbox {
  width: 90%;
  height: 128rpx;
  background-color: #000000;
  opacity: 0.8;
  border-radius: 24rpx;
  // margin: ;
  position: absolute;
  bottom: 5%;
  left: 4%;
  display: flex;
  align-items: center;
  .regimg {
    width: 72rpx;
    height: 72rpx;
    margin: 0 16rpx 0 24rpx;
  }
  .regtitle_1 {
    font-size: 28rpx;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10rpx;
  }
  .regtitle_2 {
    font-size: 24rpx;
    color: #fff;
    opacity: 0.6;
  }
  .regbtn {
    width: 188rpx;
    height: 60rpx;
    border-radius: 32rpx;
    background: linear-gradient(180deg, #fef0bc 0%, #b98b51 100%);
    font-size: 28rpx;
    color: #4c310c;
    text-align: center;
    line-height: 60rpx;
    margin-left: 56rpx;
  }
}
.couponbox {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  .titleh1 {
    width: 508rpx;
    height: 84rpx;
    margin-left: 70rpx;
    margin-bottom: 32rpx;
  }
  .coupon {
    position: relative;
    width: 576rpx;
    height: 548rpx;
    background-image: url("https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17128894802161316.png");
    background-repeat: no-repeat;
    background-size: cover;
    margin-left: 35rpx;
    .title1 {
      width: 288rpx;
      height: 56rpx;
      border-radius: 0, 0, 20rpx, 20rpx;
      background: linear-gradient(180deg, #ffebd4 0%, #ffe0ac 100%);
      text-align: center;
      line-height: 56rpx;
      font-size: 32rpx;
      font-weight: 600;
      color: #3b1e06;
      margin: 0 auto;
      margin-bottom: 36rpx;
    }
    .conbox {
      position: relative;
      background-image: url("https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17128895073561466.png");
      background-repeat: no-repeat;
      background-size: cover;
      width: 496rpx;
      height: 120rpx;
      display: flex;
      align-items: center;
      margin: 0 auto;
      margin-bottom: 20rpx;
      .conimg {
        width: 96rpx;
        height: 96rpx;
      }
      .contitle_1 {
        font-size: 28rpx;
        font-weight: 600;
        color: #67370d;
      }
      .contitle_2 {
        font-size: 20rpx;
        color: #946032;
      }
      .numbox {
        position: absolute;
        right: 0;
        top: 0;
        background-image: url("https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17128897267561216.png");
        background-repeat: no-repeat;
        background-size: cover;
        width: 64rpx;
        height: 32rpx;
        font-size: 20rpx;
        font-weight: 600;
        color: #fff;
        text-align: center;
        line-height: 26rpx;
      }
    }
    .nicebtn {
      width: 368rpx;
      height: 88rpx;
      position: absolute;
      bottom: 30rpx;
      left: 100rpx;
      border-radius: 47rpx;
      // margin: 0 auto;
      // margin-top: 54rpx;
      background: linear-gradient(90deg, #fedca1 0%, #fec76d 100%);
      text-align: center;
      line-height: 88rpx;
      font-size: 32rpx;
      font-weight: 600;
      color: #3b1e06;
    }
  }
  .closeimg {
    width: 60rpx;
    height: 60rpx;
    margin-top: 40rpx;
    margin-left: 298rpx;
  }
}

.fix {
  position: fixed;
  width: 750rpx;
  top: 0;
  left: 0;
  z-index: 98;
  background-color: #fff;
}

.logo {
  box-sizing: border-box;
  height: 44px;
  width: 750rpx;
  background: #ffffff;
  position: relative;

  image {
    position: absolute;
    left: 24rpx;
    bottom: 0;
    width: 30%;
    height: 90%;
  }
}
.skiflex{
  width: 100%;
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: 24rpx 0;
  padding-left: 38rpx;
  box-sizing: border-box;
  .skibox{
    margin-right: 40rpx;
    text-align: center;
    .skiimg{
      width: 96rpx;
      height: 96rpx;
    }
    .skiname{
      width: 124rpx;
      font-size: 20rpx;
      color: #666666;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
  }
}
.navbox{
  display: flex;
  align-items: center;
  width: 100%;
  height: 86rpx;
  border-bottom: 1rpx solid #e4e4e4;
  .navtext{
    color: #666666;
    font-size: 32rpx;
    margin-left: 60rpx;
    position: relative;
  }
  .navtext4{
    color: #333333 !important;
    font-size: 32rpx;
    font-weight: bold !important;
  }
  .downline{
    position: absolute;
    bottom: -10rpx;
    left: 50%;
    transform: translateX(-50%);
    width: 40rpx;
    height: 6rpx;
    background: #333333;
    border-radius: 4rpx;
  }
}


.tabs {
  box-sizing: border-box;
  z-index: 98;
  height: 44px;
  width: 750rpx;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;

  .tab1,
  .tab2,
  .tab3 {
    width: 104rpx;
    height: 48rpx;
    background: #F6F6F6;
    border-radius: 24rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28rpx;
    color: #666666;
    margin-left: 20rpx;
    .user_news {
      width: 62rpx;
      height: 36rpx;
      border-radius: 18rpx;
      font-size: 24rpx;
      color: #fff;
      background-color: #fd4c61;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-left: -15rpx;
      margin-top: 10rpx;
    }
  }

  .tab5 {
    font-size: 32rpx;
    line-height: 44px;
    height: 44px;
    margin-right: 55rpx;
    color: #fff;
  }

  .tab4 {
    color: #333333;
    position: relative;
    font-size: 28rpx;
    font-weight: bold;
    // &::before {
    //   position: absolute;
    //   left: 50%;
    //   transform: translate(-50%, -50%);
    //   bottom: 0;
    //   display: block;
    //   content: "";
    //   width: 34rpx;
    //   height: 10rpx;
    //   background: #333333;
    //   border-radius: 300rem;
    // }
  }
  .checkbox {
    position: relative;
    display: flex;
    color: #666;
    font-size: 26rpx;
    padding: 6rpx 14rpx;
    padding-right: 36rpx;
    border-radius: 8rpx;
    background-color: #f5f5f5;
    &::after {
      position: absolute;
      top: 76%;
      right: -4rpx;
      transform: translate(-50%, -50%) rotate(135deg);
      content: "";
      border-top: 12rpx solid transparent;
      border-left: 12rpx solid transparent;
      border-right: 12rpx solid transparent;
      border-bottom: 12rpx solid #999;
    }
  }
}

.tabssearch {
  display: flex;
  align-items: center;
  height: 50px;
  width: 100%;
  box-sizing: border-box;
}

.user_status_box {
  height: 72rpx;
  .item {
    height: 72rpx;
    background-color: #feeecd;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text {
      font-size: 28rpx;
      color: #b6722e;
      text-decoration: underline;
    }
    .close {
      position: absolute;
      right: 24rpx;
      top: 18rpx;
      width: 36rpx;
      height: 36rpx;
    }
  }
}

.message_box {
  line-height: 64rpx;
  text-align: center;
  height: 64rpx;
  padding: 25rpx 0 15rpx 0;

  .item {
    text-align: center;
    width: 40%;
    border: 2px solid rgba(253, 249, 246, 0.4);
    border-radius: 12px;
    background-color: #e1c4a6;
    margin: 0 auto;
    font-weight: bold;
    color: #111111;
  }
}

.list {
  padding-left: 26rpx;
  padding-right: 26rpx;
  padding-bottom: 60rpx;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  .item {
    margin-top: 20rpx;
    width: 340rpx;
    height: 450rpx;
    border-radius: 16rpx;
    overflow: hidden;
    background: #26252b;

    .top {
      position: relative;
      height: 450rpx;
      width: 340rpx;

      .tagbox {
        position: absolute;
        left: 0;
        top: 0;
        width: 80rpx;
        height: 40rpx;
        border-radius: 0 0 40rpx 0;
        z-index: 1000;

        .tagcolor {
          text-align: center;

          line-height: 40rpx;
          width: 100%;
          height: 100%;
          font-size: 20rpx;
          border-radius: 0 0 20rpx 0;

          color: black;
          background: linear-gradient(90deg, #c79f67 0%, #ecd5a0 100%);
        }

        .tagcolor2 {
          text-align: center;
          line-height: 40rpx;
          font-size: 20rpx;
          width: 100%;
          height: 100%;
          border-radius: 0 0 20rpx 0;
          color: #fff;

          background: linear-gradient(90deg, #e076e3 0%, #d67eef 100%);
        }
      }

      .imgbox {
        position: relative;
        z-index: 1;
        height: 450rpx;
        width: 340rpx;

        image {
          height: 100%;
          width: 100%;
        }
      }

      .online {
        position: absolute;
        z-index: 10;
        top: 10rpx;
        right: 14rpx;
        color: #ffffff;
        font-size: 24rpx;

        &::before {
          display: inline-block;
          content: "";
          height: 16rpx;
          width: 16rpx;
          border-radius: 16rpx;
          background: #27ba2c;
          margin-right: 6rpx;
        }
      }

      .pop {
        box-sizing: border-box;
        position: absolute;
        z-index: 10;
        bottom: 140rpx;
        left: 7rpx;
        width: 220rpx;
        font-size: 24rpx;
        font-weight: bold;
        line-height: 40rpx;
        padding-left: 10rpx;
        color: #fff;

        image {
          width: 32rpx;
          height: 32rpx;
        }
      }

      .top_bottom {
        box-sizing: border-box;
        position: absolute;
        z-index: 10;
        bottom: 0;
        left: 0;
        width: 340rpx;
        height: 145rpx;
        background: linear-gradient(
          0deg,
          rgba(0, 0, 0, 0.5) 0%,
          rgba(0, 0, 0, 0) 100%
        );
        align-items: center;
        padding: 10rpx 15rpx 0rpx;
        .memberInfo {
          display: flex;
          align-items: center;
          margin-top: 30rpx;
          .name {
            padding-left: 10rpx;
            max-width: 200rpx;
            // height: 45rpx;
            font-size: 40rpx;
            // line-height: 32rpx;
            font-weight: bold;
            color: #fff;
            padding-right: 16rpx;
            display: flex;
            align-items: center;
          }

          .member {
            min-width: 52rpx;
            height: 32rpx;
            // background: linear-gradient(135deg, #7e7e7e 0%, #292929 100%);
            border-radius: 2rpx;
            border: 2rpx solid #d6c6ab;
            text-align: center;
            color: #fff;
            font-size: 16rpx;
            line-height: 32rpx;
          }
          .vipimg{
            width: 110rpx;
            height: 32rpx;
          }
          
          .member_wealth {
            width: 45rpx;
            height: 32rpx;
            background: linear-gradient(135deg, #deb214 0%, #f88410 100%);
            border-radius: 2rpx;
            border: 2rpx solid #d6c6ab;
            text-align: center;
            color: #fff;
            font-size: 16rpx;
            line-height: 32rpx;
            margin-left: 5rpx;
          }
        }
      }
    }

    .memberInfo2 {
      .bottom_info {
        margin-top: 12rpx;
        line-height: 36rpx;
        padding-left: 10rpx;
        text {
          margin-right: 8rpx;
          font-size: 24rpx;
          color: #fff;
        }
      }

      .flx {
        padding-right: 20rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .wx {
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        height: 40rpx;
        line-height: 40rpx;
        flex: 1;
        text {
          margin-left: 8rpx;
          font-size: 24rpx;
          color: #ffffff;
        }
      }

      .distance {
        display: flex;
        align-items: center;
        // flex: 1;
        // justify-content: flex-end;
        image {
          height: 24rpx;
          width: 24rpx;
        }

        text {
          font-size: 24rpx;
          margin-left: 8rpx;
          color: #fff;
        }
      }
    }
  }
}


.ad-popup {
  background-color: #000;
  box-shadow: 0 0 15px #e7c91b;
  min-width: 550rpx;
  min-height: 500rpx;

  .popup-title {
    text-align: center;
    position: relative;
    color: #ffffff;
    font-weight: bold;

    .popup-close {
      font-size: 24rpx;
      position: absolute;
      right: 20rpx;
      top: 15rpx;
      color: #ffffff;
    }
  }

  .u-icon {
    text-align: center;

    image {
      width: 128rpx;
      height: 128rpx;
    }
  }

  image {
    width: 100%;
    height: 100%;
  }

  .down-close {
    width: 100%;
    text-align: center;
    align-items: center;
  }
}

</style>